<me:UIVAF x:Class="WPFExcelReport.TWVA09"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                     xmlns:WF="clr-namespace:WPFExcelReport;assembly=TWAFARBEN" 
                    xmlns:WS="clr-namespace:WPFExcelReport;assembly=TWASTAMM" 
                    xmlns:WFF="clr-namespace:WPFExcelReport;assembly=TICC_WFEVENTS" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIVAF.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:RGB2ColorConverter x:Key="rgb"/>
    </me:UIVAF.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions> 
        <WrapPanel Grid.Row="0">
            <WFF:TBTNEXE INFO="色号管理" IsInfo="True" CMD="VA09" DLL="TVAFARBEN" STWNW="MainWindow"
                         KEY="{Binding EXAUF,ElementName=TV}"/>
            <TextBlock Visibility="Collapsed" Text="{Binding KOLL}" Width="60"/>
            <TextBlock Visibility="Collapsed"  Text="{Binding ART}" Width="100"/>
            <ex:TXT72 Visibility="Collapsed"  Text="{Binding FARBE}" MaxLength="10" Width="60"/>
            <Button  Visibility="Collapsed" Grid.Column="1" Click="NewCommand" Width="24" Height="20" HorizontalAlignment="Left" >
                <Button.Background>
                    <ImageBrush  ImageSource="/ImagePackage;component/Images/Add.png" />
                </Button.Background>
            </Button>
            <TextBlock Text="{Binding VAFFARBE}"/> 
        </WrapPanel> 
        <DataGrid  Grid.Row="1" 
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"     
                   IsReadOnly="True"
                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                   IsSynchronizedWithCurrentItem="True" 
                   x:Name="dlgMaster"  
                   RowDetailsVisibilityMode="Visible"  
                    >
            <DataGrid.Columns>
                <DataGridTemplateColumn Width="40" >
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <Grid >
                                <TextBlock >
                                    <TextBlock.Background>
                                        <SolidColorBrush Color="{Binding RGB,Converter={StaticResource ResourceKey=rgb}}"></SolidColorBrush>
                                    </TextBlock.Background>
                                </TextBlock>
                            </Grid>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTextColumn Binding="{Binding Path=VAFFARBE}" Header="{Binding Source={Localization:Translate Word=色号}}"  Width="40" />
                <DataGridTextColumn Binding="{Binding Path=VAFFFARBE}" Header="{Binding Source={Localization:Translate Word=生产色号}}"  Width="40" />
                <DataGridTextColumn Binding="{Binding Path=VAFBESCHICH, Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=后整}}"  Width="40" />
                <DataGridTextColumn Binding="{Binding Path=VAFBEZ, Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=色名}}"  Width="60" />
                <DataGridTextColumn Binding="{Binding Path=VAFDESS, Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=印花}}"  Width="40" />
                <DataGridTextColumn Binding="{Binding Path=VAFCOLORIT, Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=配色}}"  Width="40" />
                <DataGridTextColumn Binding="{Binding Path=VAFPGROE, Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=尺码}}"  Width="40" />
            </DataGrid.Columns>
        </DataGrid  >
        <WF:TWAFARBEN Name="cWF" IsStock="False"  
                      Visibility="Collapsed"
                      IsAuto="True"  
                      ORDERNUM="{Binding PRART,ElementName=TV}"/>
    </Grid>
</me:UIVAF>
